<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const d = new Date(2012, 1, 20, 3, 12);
      const ws = {
        1: 'MO',
        2: 'TU',
        3: 'WE',
        4: 'TH',
        5: 'FR',
        6: 'SA',
        0: 'SU',
      };
      console.log(ws[d.getDay()]);

      // const day = d.getDay();
      // console.log(ws[day]);
      // console.log(d.getDay());
    </script>
  </body>
</html>
